package com.movecar.ui;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.movecar.R;

/**
 * 用户使用条款
 * 
 * @author Zhao.JQ
 * 
 */
public class ProtocolShowActivity extends Activity implements OnClickListener {

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.protocol_show);
		initView();
	}

	private void initView() {
		//查看是否有此手机号登录
		SharedPreferences sharedPreferences = getSharedPreferences("login",
				Context.MODE_PRIVATE);
		// 
		String userId = sharedPreferences.getString("userId", "");
		String mobile = sharedPreferences.getString("mobile", "");
		Button btn_left = (Button) findViewById(R.id.btn_left);
		btn_left.setVisibility(View.VISIBLE);
		btn_left.setOnClickListener(this);

		TextView title = (TextView) findViewById(R.id.title);
		title.setText("用户使用条款");

	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_left:
			finish();
			break;

		default:
			break;
		}

	}

}
